package com.heima.user.controller.v1;


import com.heima.model.behavior.dtos.FollowBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.user.service.ApUserRelationService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/api/v1/user")
@RequiredArgsConstructor
public class ApUserBehaviorController {


    //
    private final ApUserRelationService apUserRelationService;

    /**
     * 关注 与 取消关注
     *
     * @return
     */
    @PostMapping("/user_follow")
    public ResponseResult userFollowBehavior(@RequestBody FollowBehaviorDto followBehaviorDto){

        log.info("关注与取消关注,{}",followBehaviorDto);

        return apUserRelationService.userFollowBehavior(followBehaviorDto);
    }





}
















